// GMEditEx.cpp : implementation file
//

#include "stdafx.h"
#include "../GameBrowser.h"
#include "GBEditEx.h"
#include "GBComboBoxEx.h"


// CGBEditEx

IMPLEMENT_DYNAMIC(CGBEditEx, CEdit)

CGBEditEx::CGBEditEx()
{

}

CGBEditEx::~CGBEditEx()
{
}


BEGIN_MESSAGE_MAP(CGBEditEx, CEdit)
	ON_WM_CHAR()
	ON_WM_KEYDOWN()
END_MESSAGE_MAP()



// CGMEditEx message handlers

void CGBEditEx::SetGBComboBox(CGBComboBoxEx* pCmb)
{
	m_pCmbBox = pCmb;
}

void CGBEditEx::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
	// TODO: Add your message handler code here and/or call default

	if (nChar == VK_RETURN)
	{
		//ASSERT(FALSE);
	}

	CEdit::OnChar(nChar, nRepCnt, nFlags);
}

void CGBEditEx::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
	// TODO: Add your message handler code here and/or call default

	if (nChar == VK_RETURN)
	{
		m_pCmbBox->OnUserPutEnterKey();
	}
	CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}
